package com.mrx.commons.logback.config;

import com.mrx.commons.logback.collector.OpenObserveLogCollector;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * openObserve 日志收集器配置
 *
 * @author Mr.X
 * @since 2023-12-10 上午 8:17:25
 */
@Configuration
@EnableConfigurationProperties(XLogCollectorProperties.class)
public class XLogCollectorConfig {

    @Autowired
    public void setConfig(XLogCollectorProperties properties) {
        properties.checkProperties();
        OpenObserveLogCollector.setProperties(properties);
    }

}
